package cn.zhiwen.quart;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Auther: wuzhiwen
 * @Date: 2018/11/22 16:55
 * @Description:
 */
@Component
public class DistruedTest {

//    @Scheduled(cron = "0/40 * * * * ?")
     @Scheduled(cron = "0/1 * * * * ? ")
    public void run() {
            doJob();
    }

    private void doJob() {
        Thread pushMsgThread = new Thread() {
            @Override
            public void run() {
                System.out.println(new Date() + "==============");
            }
        };
        pushMsgThread.start();
    }

}
